/*
 * @Description:
 * @Author: cgt
 * @Date: 2021-11-06 10:21:55
 * @LastEditors: cgt
 * @LastEditTime: 2021-12-28 19:44:54
 */
import { projectLngLatToWebMercator } from '../../../../../mapUtils/CoordinateUtil';
import IpmsPoint from '../IpmsPoint';
import RuleResult from '../vo/RuleResult';

/**
 * power symbol station main interface
 */
class PmsPds extends IpmsPoint {
  constructor(_tool) {
    super(_tool);
    this.drawtype = 'pms_pds';
    this.defaultIcon = '1030020';
    this.defaultName = '配电室';
  }

  /**
     * 获取当前绘制设备信息
     * @override
     */
  async getTargetDevice() {
    let coordinates = projectLngLatToWebMercator(this.geometry.coordinates);
    let data = {
      ...this.option,
      shape: this.getGeometryWkt(this.geometry),
      coordinates
    };
    return data;
  }
  start(option) {
    return super.start(option);
  }
  async _ruleJudgePoint() {
    let index = 0;
    return new RuleResult(true, index, 'success');
  }
}

export default PmsPds;
